package pac1;

import pac2.Student;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 34255
 * Date: 2024-10-18
 * Time: 8:51
 */
public class Main {
    public static void main(String[] args) {
        // 创建两个学生对象，假设性别为 "Male"
        int[] grades1 = {85, 90, 78};
        int[] grades2 = {92, 88, 95};

        Student S1 = new Student("Alice", "Male", 20, grades1);
        Student S2 = new Student("Bob", "Male", 22, grades2);

        // 输出学生信息
        System.out.println("Student 1: " + S1.getName());
        System.out.println("Average Grade: " + S1.avg());
        System.out.println("Max Grade: " + S1.max(grades1));
        System.out.println("Min Grade: " + S1.min(grades1));

        System.out.println("\nStudent 2: " + S2.getName());
        System.out.println("Average Grade: " + S2.avg());
        System.out.println("Max Grade: " + S2.max(grades2));
        System.out.println("Min Grade: " + S2.min(grades2));
    }
}
